//
//  ViewController.m
//  DemoForSignIn
//
//  Created by  高东星 on 17/8/25.
//  Copyright © 2017年 anmur. All rights reserved.
//

#import "ViewController.h"
#import "AMPointProgressView.h"
#import "AMProgressView.h"

#import "AMIntegralCountView.h"
#import "AMGetIntegralView.h"



@interface ViewController () <AMGetIntegralViewDelegate>


@property (nonatomic,weak) AMPointProgressView *p;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    AMPointProgressView *progressView = [AMPointProgressView new];
    progressView.pointArray = @[@(7),@(15),@(30),@(60),@(90)];
    progressView.point = 15;
    progressView.frame = CGRectMake(0, 100, self.view.frame.size.width, 40);


    // default (10,10)
    progressView.pointImageViewSize = CGSizeMake(15, 15);
    // default 3
    progressView.lineProgressViewHeight = 5;
    progressView.endPoint = 120;
    progressView.startPoint = 0;
    [self.view addSubview:progressView];
    _p = progressView;
    _p.backgroundColor = [UIColor blueColor];
//    _p.point = 15;
    
    
    
    AMIntegralCountView *con = [AMIntegralCountView new];
    con.integralCount = 10;
    con.frame = CGRectMake(30, 400, 42, 27);
    con.backgroundColor = [UIColor redColor];
    [self.view addSubview:con];
    
    AMGetIntegralView *get = [AMGetIntegralView new];
    get.state = AMGetIntegralViewGetStateNormal;
    get.frame = CGRectMake(30, 300, 42, 50);
    get.delegate = self;
    [self.view addSubview:get];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//static NSInteger num = 0;
//- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
//    num += 1;
//    _p.point = num;
////    if (num % 2 == 0) {
////    _p.pointTintColor = [UIColor yellowColor];
////    }else{
////    _p.pointTintColor = [UIColor blueColor];
////    }
//    
//    NSLog(@"签到第 %zd 天",num);
//}

- (void)getIntegralViewGetButtonDidClick:(AMGetIntegralView *)getIntegralView{
    getIntegralView.state = AMGetIntegralViewGetStateGetting;
}
@end
